<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>2 nextTick</title>
</head>

<body>
  <div id="app">
    <ul>
      <li ref='wuwuwu' v-for="list in lists">{{list.name}} - {{list.age}}</li>
    </ul>
  </div>

  <!-- <script src="../../node_modules/vue/dist/vue.min.js"></script> -->
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.min.js"></script>
  <script>
    let vm = new Vue({
      data: {
        message: "no update",
        lists: [
          { name: "Henry", age: 22 },
          { name: "Elisy", age: 18 },
          { name: "Bucky", age: 23 },
          { name: "Lemon", age: 15 }
        ]
      },
      mounted() {
        this.lists.push({ name: "Jane", age: 18 });
        this.lists.unshift({ name: "John", age: 25 });
        console.log("outer =>", this.$refs.wuwuwu);// [li, li, li, li]
        this.$nextTick(() => {
          console.log("inner =>", this.$refs.wuwuwu);// [li, li, li, li, li, li]
        })
      }
    }).$mount("#app");
  </script>
</body>

</html>